.class public Les/dh0;
.super Ljava/lang/Object;
.source "NotificationHelper.java"


# static fields
.field private static c:Les/dh0;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/app/NotificationManager;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method private constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Les/dh0;->a:Landroid/content/Context;

    .line 3
    sget p1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v0, 0x1a

    if-lt p1, v0, :cond_0

    .line 4
    invoke-direct {p0}, Les/dh0;->b()Landroid/app/NotificationManager;

    :cond_0
    return-void
.end method

.method private a(Landroid/app/NotificationChannel;)Landroid/app/NotificationChannel;
    .locals 2
    .annotation build Landroid/annotation/TargetApi;
        value = 0x1a
    .end annotation

    const/4 v0, 0x1

    .line 20
    invoke-virtual {p1, v0}, Landroid/app/NotificationChannel;->enableLights(Z)V

    const v1, -0xff0100

    .line 21
    invoke-virtual {p1, v1}, Landroid/app/NotificationChannel;->setLightColor(I)V

    const/4 v1, 0x0

    .line 22
    invoke-virtual {p1, v1}, Landroid/app/NotificationChannel;->setLockscreenVisibility(I)V

    .line 23
    invoke-virtual {p1, v0}, Landroid/app/NotificationChannel;->setShowBadge(Z)V

    return-object p1
.end method

.method public static a(Landroid/app/Application;)Les/dh0;
    .locals 2

    .line 1
    sget-object v0, Les/dh0;->c:Les/dh0;

    if-nez v0, :cond_1

    .line 2
    const-class v0, Les/dh0;

    monitor-enter v0

    .line 3
    :try_start_0
    sget-object v1, Les/dh0;->c:Les/dh0;

    if-nez v1, :cond_0

    .line 4
    new-instance v1, Les/dh0;

    invoke-direct {v1, p0}, Les/dh0;-><init>(Landroid/content/Context;)V

    sput-object v1, Les/dh0;->c:Les/dh0;

    .line 5
    :cond_0
    monitor-exit v0

    goto :goto_0

    :catchall_0
    move-exception p0

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p0

    .line 6
    :cond_1
    :goto_0
    sget-object p0, Les/dh0;->c:Les/dh0;

    return-object p0
.end method

.method private a(Ljava/lang/String;Ljava/lang/CharSequence;I)V
    .locals 3
    .annotation build Landroid/annotation/TargetApi;
        value = 0x1a
    .end annotation

    .line 15
    new-instance v0, Landroid/app/NotificationChannel;

    invoke-direct {v0, p1, p2, p3}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    .line 16
    invoke-virtual {p1}, Ljava/lang/String;->hashCode()I

    move-result p2

    const/4 p3, 0x3

    const/4 v1, 0x2

    const/4 v2, 0x1

    sparse-switch p2, :sswitch_data_0

    goto :goto_0

    :sswitch_0
    const-string p2, "application_update_remind"

    invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x3

    goto :goto_1

    :sswitch_1
    const-string p2, "order_remind"

    invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x2

    goto :goto_1

    :sswitch_2
    const-string p2, "general_remind"

    invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x0

    goto :goto_1

    :sswitch_3
    const-string p2, "other_remind"

    invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x1

    goto :goto_1

    :cond_0
    :goto_0
    const/4 p1, -0x1

    :goto_1
    if-eqz p1, :cond_2

    if-eq p1, v2, :cond_1

    if-eq p1, v1, :cond_1

    if-eq p1, p3, :cond_1

    goto :goto_2

    .line 17
    :cond_1
    invoke-direct {p0, v0}, Les/dh0;->a(Landroid/app/NotificationChannel;)Landroid/app/NotificationChannel;

    goto :goto_2

    .line 18
    :cond_2
    invoke-direct {p0, v0}, Les/dh0;->b(Landroid/app/NotificationChannel;)Landroid/app/NotificationChannel;

    .line 19
    :goto_2
    iget-object p1, p0, Les/dh0;->b:Landroid/app/NotificationManager;

    invoke-virtual {p1, v0}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V

    return-void

    nop

    :sswitch_data_0
    .sparse-switch
        0x367e4d14 -> :sswitch_3
        0x39d9803c -> :sswitch_2
        0x3b8f2316 -> :sswitch_1
        0x49ee2c8c -> :sswitch_0
    .end sparse-switch
.end method

.method private b(Landroid/app/NotificationChannel;)Landroid/app/NotificationChannel;
    .locals 2
    .annotation build Landroid/annotation/TargetApi;
        value = 0x1a
    .end annotation

    const/4 v0, 0x1

    .line 4
    invoke-virtual {p1, v0}, Landroid/app/NotificationChannel;->enableLights(Z)V

    const v1, -0xff0100

    .line 5
    invoke-virtual {p1, v1}, Landroid/app/NotificationChannel;->setLightColor(I)V

    const/4 v1, 0x0

    .line 6
    invoke-virtual {p1, v1}, Landroid/app/NotificationChannel;->setLockscreenVisibility(I)V

    .line 7
    invoke-virtual {p1, v0}, Landroid/app/NotificationChannel;->setShowBadge(Z)V

    return-object p1
.end method

.method private b()Landroid/app/NotificationManager;
    .locals 2

    .line 1
    iget-object v0, p0, Les/dh0;->b:Landroid/app/NotificationManager;

    if-nez v0, :cond_0

    .line 2
    iget-object v0, p0, Les/dh0;->a:Landroid/content/Context;

    const-string v1, "notification"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Les/dh0;->b:Landroid/app/NotificationManager;

    .line 3
    :cond_0
    iget-object v0, p0, Les/dh0;->b:Landroid/app/NotificationManager;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;
    .locals 2

    .line 24
    new-instance v0, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Les/dh0;->a:Landroid/content/Context;

    invoke-direct {v0, v1, p1}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    return-object v0
.end method

.method public a()V
    .locals 3
    .annotation build Landroid/annotation/TargetApi;
        value = 0x1a
    .end annotation

    .line 7
    iget-object v0, p0, Les/dh0;->a:Landroid/content/Context;

    sget v1, Lcom/permission/runtime/n;->notify_scene_channel:I

    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x2

    const-string v2, "general_remind"

    .line 8
    invoke-direct {p0, v2, v0, v1}, Les/dh0;->a(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    .line 9
    iget-object v0, p0, Les/dh0;->a:Landroid/content/Context;

    sget v2, Lcom/permission/runtime/n;->notify_projection_screen_channel:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    const-string v2, "other_remind"

    .line 10
    invoke-direct {p0, v2, v0, v1}, Les/dh0;->a(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    .line 11
    iget-object v0, p0, Les/dh0;->a:Landroid/content/Context;

    sget v2, Lcom/permission/runtime/n;->notify_application_update_channel:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    const-string v2, "application_update_remind"

    .line 12
    invoke-direct {p0, v2, v0, v1}, Les/dh0;->a(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    .line 13
    iget-object v0, p0, Les/dh0;->a:Landroid/content/Context;

    sget v2, Lcom/permission/runtime/n;->notify_order_channel:I

    invoke-virtual {v0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    const-string v2, "order_remind"

    .line 14
    invoke-direct {p0, v2, v0, v1}, Les/dh0;->a(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    return-void
.end method
